import request from '../plugin/axios'

export function AccountLogin (data) {
  request.defaults.baseURL = data.site
  return request({
    url: '/client/login',
    method: 'post',
    data,
    config: {
      headers: {
        'Content-Type': 'application/json', // 设置跨域头部
        'Authorization': 'JWT ' + sessionStorage.getItem('authToken'),
        'Access-Control-Allow-Origin': '*',
        'Access-Control-Allow-Headers': 'X-Requested-With,Content-Type',
        'Access-Control-Allow-Methods': 'PUT,POST,GET,DELETE,OPTIONS'
      }
    }
  })
}
